//
//  E7TouchSprite.h
//  EndlessBattle
//
//  Created by cc on 12-5-2.
//  Copyright (c) 2012年 PalmGame. All rights reserved.
//

#ifndef EndlessBattle_E7TouchSprite_h
#define EndlessBattle_E7TouchSprite_h

#include "E7GameDefine.h"

class CE7MenuLayer ;

class CE7TouchSprite : public CCSprite, public CCTargetedTouchDelegate
{
public:
    CE7TouchSprite(int nID, CCSprite* pNormal, CCSprite* pSelect,
                   CCSprite* pOtherC, CCSprite* pOtherL, CCSprite* pOtherR,
                   CCSprite* pNumberF, CCSprite* pNumberS, int nLv, CE7MenuLayer* pMenuLayer) ;
    ~CE7TouchSprite() ;

public:
    void SetLevel() ;
    void Show() ;
    void Hide() ;

private:
    virtual void onEnter() ;
    virtual void onExit() ;

    virtual void touchDelegateRetain() {}
	virtual void touchDelegateRelease() {}

public:
    virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) ;
 	virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) ;
 	virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) ;
 	virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) ;

private:
    int          m_nID ;
    int          m_nLevel ;
    CCSprite*    m_pNormal ;
    CCSprite*    m_pSelect ;
    CCSprite*    m_pLevel[3] ;
    CCSprite*    m_pNumber[2] ;

    CE7MenuLayer*    m_pParent ;
} ;

#endif














